Skip to content

feat: adopt the LiteLLM 1.109 and 1.110 model_info capability flags - #307

Open
balcsida wants to merge 3 commits into
mainfrom
feat/litellm-1111-capability-flags
Open

balcsida wants to merge 3 commits into
mainfrom
feat/litellm-1111-capability-flags

Conversation

@balcsida

@balcsida balcsida commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

LiteLLM shipped 1.105 to 1.111 since we last looked at it, and its ProviderSpecificModelInfo grew flags that declare what discovery was inferring from backend identity. This reads five of them.

  • thinking_always_on denies Pi's off level outright. Pi's Anthropic catalog already denies it for always-on Claude, but its Bedrock, Vertex and Databricks catalogs do not, and that is where the flag lands (claude-sonnet-5-5 among them).
  • thinking_on_by_default denies the off level below 1.110.0, the release that turns reasoning_effort: "none" into thinking: {"type": "disabled"}. Earlier releases sent nothing, so the backend kept thinking and billing it.
  • model_info.pricing_provider is the operator naming the catalog whose rows price a deployment, so resolveCatalogProvider returns it ahead of every inference, including the conflicts that otherwise withhold an identity. It is a pricing statement, not routing, so routesOnlyThrough keeps ignoring it.
  • supports_prompt_caching: false withholds promptCache whatever the family documents, since a relay can host a Claude generation that bills no cache (kyma/claude-fable-5).
  • azure_ai Claude keeps supportsMidConvoEffort on 1.109.0 and later, the release that stopped dropping the thinking-binding-controls-2026-08-01 beta header on the way to Foundry. Bedrock and Vertex stay denied, no release is evidence for them.

Both thinking flags are read in reportedLevel ahead of the declared reasoning_effort_levels list, because an accepted none still does not stop the thinking. That way they reach the Chat, Responses and native Messages level maps from one place.

publishesVersionGatedTransport becomes publishesVersionGatedBehavior and probes for think-by-default routes too. The azure_ai gate adds no request, since those groups already probe for the Messages floor.

LITELLM_DISCOVERY_VERSION goes to 17, so stored models are rediscovered once.

I checked the flags actually reach us rather than assuming it: LiteLLM's model_info_v1 merges the whole cost-map row into the response with no allowlist, and the deployment's own block carries pricing_provider.

Left out on purpose: default_reasoning_effort (all 38 cost-map rows are "none", so it cannot replace the GPT-6 inference), supports_per_turn_control (declared but no row sets it), and the pdf, audio, video and continuation flags (Pi's ModelInputModality is text and image only).

Tested with npm run check, go test -race ./..., pig package validate ./pig, and the mock proxy smoke on all three protocols.

Confidence Score: 5/5 · The PR appears safe to merge; all three previous findings are addressed.RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; all three previous findings are addressed.

Summary

Discovery reads LiteLLM's thinking, pricing, and prompt-cache flags in TypeScript and Go.

  • Thinking levels now reflect whether the proxy can turn thinking off.
  • Azure AI Foundry Claude routes can use mid-conversation effort on newer proxies.
  • Declared pricing providers now choose the catalog used for a deployment.
  • Explicit cache denials now suppress published prompt-cache lifetimes.

All three previous findings are addressed. No new actionable issue was established.

Reviews (2) · Last reviewed commit: "fix(discovery): close three review findi..." · Reviewed by Greptile

LiteLLM shipped 1.105 to 1.111 since this extension last looked at it, and its
ProviderSpecificModelInfo grew flags that declare what discovery was inferring
from backend identity.

- thinking_always_on denies Pi's off level outright. Pi's Anthropic catalog
  already denies it for always-on Claude, but its Bedrock, Vertex and
  Databricks catalogs do not, and that is where the flag lands
  (claude-sonnet-5-5 among them).
- thinking_on_by_default denies the off level below 1.110.0, the release that
  turns reasoning_effort "none" into thinking {"type": "disabled"}. Earlier
  releases sent nothing, so the backend kept thinking and billing it.
- model_info.pricing_provider is the operator naming the catalog whose rows
  price a deployment, so resolveCatalogProvider returns it ahead of every
  inference, including the conflicts that otherwise withhold an identity. It
  is a pricing statement, so routesOnlyThrough keeps ignoring it.
- supports_prompt_caching false withholds promptCache whatever the family
  documents, since a relay can host a Claude generation that bills no cache.
- azure_ai Claude keeps supportsMidConvoEffort on 1.109.0 and later, the
  release that stopped dropping the thinking-binding-controls beta header on
  the way to Foundry. Bedrock and Vertex stay denied, no release is evidence
  for them.

Both thinking flags are read in reportedLevel ahead of the declared
reasoning_effort_levels list, because an accepted "none" still does not stop
the thinking, so they reach the Chat, Responses and native Messages level maps
from one place.

publishesVersionGatedTransport becomes publishesVersionGatedBehavior and probes
for think-by-default routes too. The azure_ai gate adds no request: those
groups already probe for the Messages floor.

The snapshot minimizer allowlist gains the four new fields, and the medium and
high effort flags it was already dropping while src read them.

LITELLM_DISCOVERY_VERSION goes to 17, so stored models are rediscovered once.
Mirrors the five discovery changes in the Go port, derived from the same Vitest
cases: the thinking_always_on and thinking_on_by_default off-level denials with
the 1.110.0 floor, pricing_provider as the declared catalog provider,
deniesPromptCache, and the 1.109.0 floor that lets azure_ai Claude keep
mid-conversation effort.

ReduceModelGroup, reasoningLevelMap and reportedLevel take the proxy version so
the off level can be gated, and publishesVersionGatedTransport is renamed with
the think-by-default probe like the TypeScript side.

types.DiscoveryVersion goes to 17 to match.
Comment thread src/backend-identity.ts Resolved
Comment thread src/discover.ts Resolved
Comment thread src/discover.ts Resolved
All three were cases where the branch advertised a behavior it did not have,
and my tests passed anyway because they checked the helper rather than the
path through discovery. Each fix now has a test that fails without it.

- A declared pricing_provider never reached the catalog for the conflicting
  identity it exists to settle: resolveBackendIdentity withholds the identity
  on a provider conflict before resolveCatalogProvider is reached, so
  resolveModelInfoCatalog now re-reads the row without its custom_llm_provider
  to get the bare model id the declared catalog is keyed by. It settles the
  catalog only; the identity stays withheld for family and routing.
- The mid-conversation effort grant read routesThroughAzureAi, whose
  model_info.litellm_provider arm is a cost-map lookup of base_model, not
  routing, so a Bedrock-routed Claude priced through an Azure row could keep
  managed effort and send thinking.block_binding where the beta means nothing.
  It now requires declared azure_ai routing. routesThroughAzureAi is unchanged
  for the Messages transport gate, where the adapter label is the right question.
- publishesVersionGatedBehavior probed for any think-by-default deployment, so
  a sibling with thinking_always_on, which denies the off level at every
  version, still drew a failed request and a warning that explained nothing. It
  now compares the published off level across the floor, like the Messages
  branch beside it.

Reported by Greptile on #307, each checked against the code before fixing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant